/*******************************************************************************
* Copyright (c) 2010, 2017 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.PrintSettingOrderType;
import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.*;
import java.util.List;
import java.util.Map;

/**
 * ClassName: PrintSettingOrder <br/>
 * Function: 单据打印设置 <br/>
 * date: 2018-07-05 11:50:14 <br/>
 *
 * @author 马飞月
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="print_setting_orders")
public class PrintSettingOrder extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 打印类型 (总部订单/总部入库/总部出库/总部调拨/总部盘点/...)
    @Column(name="print_type")
    @Enumerated(EnumType.STRING)
	private PrintSettingOrderType printType ;

	// 名称 (方便识记与沟通)
    @Column(name="name", length = 100)
	private String name = "";


/*	// 单据打印设置明细
	@OneToOne(mappedBy = "printSettingOrder")
	private PrintSettingOrderDetail detail = null;

	//单据打印设置动态数据
    @OneToMany(mappedBy="printSettingOrder",cascade = CascadeType.ALL)
    private List<PrintSettingOrderData> dataSet = null;

	//单据打印设置动态表格列数据
    @OneToMany(mappedBy="printSettingOrder",cascade = CascadeType.ALL)
    private List<PrintSettingOrderTableData> tableDataSet = null;*/




    @Transient
    private Map<String, String> dataMap = null;

    @Tolerate
	public PrintSettingOrder() {
		
	}
    @Tolerate
    public PrintSettingOrder(Long id){
        super.setId(id);
    }

    public PrintSettingOrderType getPrintType() {
        return printType;
    }

    public void setPrintType(PrintSettingOrderType printType) {
        this.printType = printType;
    }

    public Map<String, String> getDataMap() {
        return dataMap;
    }

    public void setDataMap(Map<String, String> dataMap) {
        this.dataMap = dataMap;
    }

	
	/**
	 * 获取名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置名称
     */
	public PrintSettingOrder setName(String name) {
		this.name = name;
		return this;
	}
}
